<#assign base=(rc.getContextPath())!''>
<html>
<head>
	<title>Emp List</title>
	<link rel="stylesheet" href="${base}/res/css/components/partialPaging.css" />
	
	<script language="javascript" src="${base}/res/js/jquery-1.7.1.js"></script>
	<script language="javascript" src="${base}/res/js/common.js"></script>
	<script src="${base}/res/components/partialPaging.js"></script>
</head>

<body>
	<input type="button" value="js" onclick="justalert();"/>
	<br/><br/><br/>
	<table style="width:60%;" align="center" border="1">
		<tr>
			<th colspan="4">查询条件</th>
		</tr>
		<tr>
			<td align="right"><b>ename</b></td>
			<td><input type="text" name="ename"/></td>
			<td align="right"><b>dname</b></td>
			<td><input type="text" name="dname"/></td>
		</tr>
		<tr>
			<td></td>
			<td colspan="3"><input type="button" value="查询" onclick="search()"/></td>
		</tr>
	</table>
	<br/><br/><br/>
	<div id="content">
	
	</div>
	
	
</body>
<script>
$(function(){
	$.ajax({
		type: "POST",
		url: "${base}/emp/page",
		data: {"pageNum": 1},
		success: function(callback) {
			$("#content").html(callback);
		}
	});
});

function search() {
	$.ajax({
		type: "POST",
		url: "${base}/emp/page",
		data: {
			"ename":$("input[name='ename']").val(), 
			"dname":$("input[name='dname']").val(),
			"pageNum":1
		},
		success: function(callback) {
			$("#content").html(callback);
		}
	});
}
</script>
</html>